package ace.module.oauth2.server.core.impl.controller.rest.rpc;

import ace.cmp.rest.spring.data.jdbc.querydsl.core.controller.sdk.AbstractSdkRestController;
import ace.cmp.security.oauth2.resource.server.core.annotation.PreAuthorizeIsInternalClient;
import ace.module.common.api.annotation.ApiRemoteImplementPriority;
import ace.module.oauth2.server.api.Oauth2RegisteredClientApi;
import ace.module.oauth2.server.api.model.dto.Oauth2RegisteredClientDto;
import ace.module.oauth2.server.core.impl.dao.entity.Oauth2RegisteredClient;
import ace.module.oauth2.server.sdk.core.feign.impl.Oauth2RegisteredClientFeign;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.experimental.Delegate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * oauth2 客户端 rpc controller.
 *
 * @author Caspar
 */
@Tag(name = "oauth2 客户端-RPC-API")
@PreAuthorizeIsInternalClient
@ApiRemoteImplementPriority
@AllArgsConstructor
@RestController
@RequestMapping(Oauth2RegisteredClientFeign.PATH)
public class Oauth2RegisteredClientRpcController
    extends AbstractSdkRestController<Oauth2RegisteredClient, String, Oauth2RegisteredClientDto>
    implements Oauth2RegisteredClientFeign {


  @Delegate
  private final Oauth2RegisteredClientApi oauth2RegisteredClientApi;
}